<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<!DOCTYPE html>
<html>
   <head>
      <title>秒杀详情</title>
     <%@ include file="common/head.jsp" %>

   </head>
   <body>

    <div class="panel panel-default text-center">
        <div class="panel-heading">
        <h1> ${seckill.name}</h1>
        </div>
    </div>


    <div class="panel-body">
    <h2 class="text-danger">
        <span class="glyphicon glyphicon-time"></span>
        <span class="glyphicon"  id="seckill-box"></span>
    </h2>
       <div id="input_phone" style="display:none">
            <input id="phone" name="phone"/> <input type="button" value="确定" id="btn_ok">
              <div id="message" class="label label-danger"></div>
       </div>

    </div>



     <!-- jQuery文件。务必在bootstrap.min.js 之前引入 -->
     <script src="http://cdn.static.runoob.com/libs/jquery/2.1.1/jquery.min.js"></script>


<script src="http://cdn.bootcss.com/jquery.countdown/2.1.0/jquery.countdown.js"></script>
     <script src="http://cdn.bootcss.com/jquery-cookie/1.4.1/jquery.cookie.js"></script>

<script src="/resources/script/seckill.js" type="text/javascript"></script>
     <!-- 最新的 Bootstrap 核心 JavaScript 文件 -->
     <script src="http://cdn.static.runoob.com/libs/bootstrap/3.3.7/js/bootstrap.min.js"></script>
     <script type="text/javascript">
          $(function(){

         $("#btn_ok").click(function(){
           var phone = $("#phone").val();
           if(!seckill.validatePhone(phone)){
                  $("#message").html("请输入正确的手机号");
           }
            $.cookie("killPhone",phone);
            window.location.reload();

         });

            seckill.detail.init({
                          seckillId: ${seckill.seckillId},
                          startTime: ${seckill.startTime.time},
                          endTime: ${seckill.endTime.time}
                      });

          })

     </script>
   </body>
</html>